﻿@model SeguriGasesERP.Models.DotacionCilindros

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.ID)
    <fieldset>
        <legend>DotacionCilindros</legend>
        
        <div class="editor-label">
            <label for="IdCliente">Cliente</label>
        </div>

        <div class="editor-field">
            @Html.DropDownList("IdCliente", new SelectList(ViewBag.Clientes as System.Collections.IEnumerable, "ID", "NombreCliente"))
        </div>  
        </fieldset>
        <fieldset>
            <table>
                <tr>                    
                    <th>Tipo de Cilindro</th>
                    <th>Depósito</th>
                </tr>
                @for (int i = 0; i < ViewBag.noCilindros; i++)
                {
                 <tr>                    
                    <td>
                       @Html.DropDownList("IdCilindro" + (i + 1), new SelectList(ViewBag.Cilindros as System.Collections.IEnumerable, "ID", "TipoCilindro"))
                    </td>
                    <td>
                        <input type="text" name="depositoCilindro@(i + 1)" />
                    </td>
                 </tr>
                }
            </table>

    </fieldset>
                   


        <p>
            <input type="hidden" name="noCilindros" value="@ViewBag.noCilindros" />
            <input type="submit" value="Create" />
        </p>
    
}

<div>
    @Html.ActionLink("Regresar a la Lista", "Index")
</div>
